refactor: migrate pubky images to coil#846
Merged
ben-kaufman merged 7 commits intofeat/pubky-profilefrom Mar 17, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
0a0d9cc to
5f6e98d
Compare
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
Thank you! Drafting the PR to avoid accidental merges until that's cleared. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5f6e98d to
6ae1a82
Compare
Collaborator
Author
|
@jvsena42 Refactored to use |
Collaborator
Author
|
requested re-review from @ben-kaufman mainly for double-checking this is OK with latest changes on base branch |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ben-kaufman
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR on top of:
Migrates pubky image loading from a manual ViewModel + two-tier cache (
PubkyImageCache) to Coil 3, simplifying the architecture and reducing custom code.Description
io.coil-kt.coil3:coil-compose:3.2.0)PubkyImageFetcher— a CoilFetcherthat handlespubky://URIs viaPubkyService.fetchFile(), including JSON file descriptor indirectionImageModule— Hilt module providing a singletonImageLoaderwith memory cache (15% app memory) and disk cache (cacheDir/pubky-images/)PubkyImagecomposable internals: removePubkyImageViewModeland use Coil'sAsyncImagewithonSuccess/onErrorcallbacks and a customImageOverlayfor smooth animated transitions between loading, success, and error statesGradientCircularProgressIndicatorfor the loading state spinnergraphicsLayerPubkyImageCache(replaced by Coil's built-in caching)PubkyRepo.fetchImage()/cachedImage()(image loading now handled entirely by Coil)PubkyRepo.signOut()to evict pubky images from Coil cachesPubkyImageFetcher(factory filtering, raw data, JSON descriptor following)PubkyRepoTestto reflect removed image methodsdocs/pubky.mdto document the new architectureNote: Uses
AsyncImage(standard composition) instead ofSubcomposeAsyncImage(subcomposition) — Coil docs recommend this for performance inLazyListcontexts like the contacts screen.Preview
coil.mp4
QA Notes
🤖 Generated with Claude Code